<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>测试</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="wcodeth=device-wcodeth, initial-scale=1, maximum-scale=1">
    <script src="js/modules/jquery.js"></script>
</head>
<body>
<script type="text/javascript">
            var  query_data = {
                "queryYearTime": new Date()
            }
    $.ajax({
        url: 'http://172.18.63.38:10001/AirDay/GetAQIInfoList',
        data: query_data,
        type: 'GET',
        dataType: 'json',
        success: function (aqidata) {
            var Div_aqiHistory = window.frames[0].window.document;
            // 利用jetable控件显示表格数据;
            $(Div_aqiHistory).find("#Div_aqiHistory").jeTable({
                height: "390",
                isPage: false,
                datas: aqidata.rows,
                columnSort: [2, 3, 4],//头部可排序的数，如[1,3,5],其中1表示第一个可排序
                columns: [
                    { name: '日期', field: '日期', width: "80", align: 'left', renderer: "" },
                    { name: 'ID', field: 'id', width: "80", align: 'center', isShow: false, renderer: "" },
                    { name: 'AQI', field: 'AQI', width: "80", align: 'left' },
                    { name: '质量等级', field: '质量等级', width: "80", align: 'left' },
                    { name: 'PM2_5', field: 'PM2_5', width: "80", align: 'left', renderer: "" },
                    { name: 'PM10', field: 'PM10', width: "80", align: 'left', renderer: "" },
                    { name: 'SO2', field: 'SO2', width: "80", align: 'left', renderer: "" },
                    { name: 'CO', field: 'CO', width: "80", align: 'left', renderer: "" },
                    { name: 'NO2', field: 'NO2', width: "80", align: 'left', renderer: "" }
                ],
                success: function (elCell, tbody) {
                }
            })
            window.frames[0].Pane_visible('Pane_aqiHistory', true);
            make_pie_charts(aqidata.rows);
            echart_line_set=aqidata.rows;
            //当表格加载完之后添加折现按钮监听，点击的话显示折线图
            window.frames[0].document.getElementById("Line_chart_history").removeEventListener("click", make_line_charts, false);
            window.frames[0].document.getElementById("Line_chart_history").addEventListener("click", make_line_charts, false);
        },
        error: function (e) {
        },
    });
</script>
</body>
</html>